<?php
	class MemberModel extends Model{
		function MemberModel(){
	        parent::Model();
	    }
	    function select(){
	    	
	    }
	    function read($id){
	    	return $this->db->where('id',$id)->get('user')->row_array();
	    }
	    function login($data){
	    	return $this->db->select('id')->where('username',$data['username'])->where('password',$data['password'])->get('user')->row()->id;
	    }
	    function insert($data){
	    	return $this->db->insert('user',$data);
	    }
	    function update($data){
	    	$id=$data['id'];
	    	unset($data['id']);
	    	return $this->db->where('id',$id)->update('user',$data);
	    }
	    function delete(){}
	}
?>